{% extends "technology_services/base.html" %}
{%load static%}

{% block title %}科技需求信息采集表{% endblock %}

{% block content %}



<div class="container">

  <nav class="navbar navbar-light bg-light">
    <div class="container-fluid">
      <a class="navbar-brand" href="#">
        <img src="{% static 'scrum/images/20648_1662706635_hd.png' %}" alt="" width="30" height="24"
          class="d-inline-block align-text-top">
        BNXD
      </a>
    </div>
  </nav>

  <h1 align="Center">科技需求信息采集表</h1>



  <div class="alert alert-primary" role="alert">
    第一部分：需求单位信息
  </div>

  <div class="row g-3">
    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label"> <span style="color: red;">*</span> 需求单位名称：</label>
      <input type="text" class="form-control" id="需求单位名称" placeholder="" value="" required>
      <div class="invalid-feedback">
        Valid first name is required.
      </div>
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="lastName" class="form-label">法人代表</label>
      <input type="text" class="form-control" id="法人代表" placeholder="" value="" required>
      <div class="invalid-feedback">
        Valid last name is required.
      </div>
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="lastName" class="form-label">注册资本（万元）</label>
      <input type="text" class="form-control" id="注册资本" placeholder="" value="" required>
      <div class="invalid-feedback">
        Valid last name is required.
      </div>
    </div>


    <div class="col-sm-6 col-md-3">
      <label for="lastName" class="form-label">注册时间</label>
      <input type="text" class="form-control" id="注册时间" placeholder="公司注册时间" required>
      <div class="invalid-feedback">
        Valid last name is required.
      </div>
    </div>



    


    <div data-toggle="distpicker" class="col-12">
      <div class="laberTitle">所属地区：</div>
      <div class="row" style="margin-left: 2px; margin-right: 2px;">
        <select class="form-control form-select col" id="省"></select>
        <select class="form-control form-select col" id="市"></select>
        <select class="form-control form-select col" id="区"></select>
      </div>
    </div>



    <div class="col-12 container">

      <div class="laberTitle">知识产权情况</div>

      <div class="row">
        <div class="col-md-3 col-6">
          <label for="exampleFormControlInput1" class="form-label">专利数量</label>
          <input type="text" class="form-control" id="专利数量" placeholder="">
        </div>

        <div class="col-md-3 col-6">
          <label for="exampleFormControlInput1" class="form-label">软件著作权</label>
          <input type="text" class="form-control" id="软件著作权" placeholder="">
        </div>

        <div class="col-md-3 col-6">
          <label for="exampleFormControlInput1" class="form-label">技术秘密数量</label>
          <input type="text" class="form-control" id="技术秘密数量" placeholder="">
        </div>

        <div class="col-md-3 col-6">
          <label for="exampleFormControlInput1" class="form-label">技术标准数量</label>
          <input type="text" class="form-control" id="技术标准数量" placeholder="">
        </div>
      </div>

    </div>


    <div class="col-12 container">

      <div class="laberTitle">人员情况</div>

      <div class="row">
        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">职工总数</label>
          <input type="text" class="form-control" id="职工总数" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">硕士（含以上）</label>
          <input type="text" class="form-control" id="硕士" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">高级职称</label>
          <input type="text" class="form-control" id="高级职称" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">中级职称</label>
          <input type="text" class="form-control" id="中级职称" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">大学本科</label>
          <input type="text" class="form-control" id="大学本科" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">其他人员情况</label>
          <input type="text" class="form-control" id="其他人员情况" placeholder="">
        </div>

      </div>

    </div>




    <div class="col-12 container">

      <div class="laberTitle">经营情况</div>

      <div class="row">
        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">资产总额</label>
          <input type="text" class="form-control" id="资产总额" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">当年资产负债率</label>
          <input type="text" class="form-control" id="当年资产负债率" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">今年营收（万元）</label>
          <input type="text" class="form-control" id="今年营收" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">去年营收（万元）</label>
          <input type="text" class="form-control" id="去年营收" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">今年研发投入（万元）</label>
          <input type="text" class="form-control" id="今年研发投入" placeholder="">
        </div>

        <div class="col-md-3 col-6" style="margin-top: 5px;">
          <label for="exampleFormControlInput1" class="form-label">去年研发投入（万元）</label>
          <input type="text" class="form-control" id="去年研发投入" placeholder="">
        </div>

      </div>

    </div>




    <div class="col-12">

      <div class="laberTitle">单位性质：</div>

      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="10" value="其他" checked>
        <label class="form-check-label" for="10">其他</label>
      </div>

      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="11" value="国有企业">
        <label class="form-check-label" for="11">国有企业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="12" value="集体企业">
        <label class="form-check-label" for="12">集体企业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="15" value="私营企业">
        <label class="form-check-label" for="15">私营企业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="19" value="科研院所">
        <label class="form-check-label" for="19">科研院所</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="13" value="有限责任公司">
        <label class="form-check-label" for="13">有限责任公司</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="14" value="股份有限公司">
        <label class="form-check-label" for="14">股份有限公司</label>
      </div>
      
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="16" value="中外合资企业">
        <label class="form-check-label" for="16">中外合资企业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="17" value="外商投资企业">
        <label class="form-check-label" for="17">外商投资企业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="单位性质" id="18" value="高校">
        <label class="form-check-label" for="18">高校</label>
      </div>
      
      

    </div>


    <div class="col-12">

      <div class="laberTitle">公司所属技术领域</div>


      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="1" value="生物医药">
        <label class="form-check-label" for="1">生物医药</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="2" value="电子信息">
        <label class="form-check-label" for="2">电子信息</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="3" value="新材料">
        <label class="form-check-label" for="3">新材料</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="4" value="能源环保">
        <label class="form-check-label" for="4">能源环保</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="5" value="工业设计">
        <label class="form-check-label" for="5">工业设计</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="6" value="装备制造">
        <label class="form-check-label" for="6">装备制造</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="7" value="现代农业">
        <label class="form-check-label" for="7">现代农业</label>
      </div>
      <div class="form-check form-check-inline">
        <input class="form-check-input" type="radio" name="公司所属技术领域" id="8" value="其他领域" checked>
        <label class="form-check-label" for="8">其他领域</label>
      </div>
    </div>


    <div class="row">


      <div class="col-12 col-sm-6 nei">

        <div class="laberTitle">是否高新技术企业</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否高新技术企业" id="21" value="是">
          <label class="form-check-label" for="21">是</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否高新技术企业" id="22" value="否" checked>
          <label class="form-check-label" for="22">否</label>
        </div>
        <div class="form-check form-check-inline">
          <input type="text" class="form-control" id="高新技术企业证书号" placeholder="证书号">
        </div>


      </div>


      <div class="col-12 col-sm-6 nei">

        <div class="laberTitle">是否科技型中小企业</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否科技型中小企业" id="31" value="是">
          <label class="form-check-label" for="31">是</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否科技型中小企业" id="32" value="否" checked>
          <label class="form-check-label" for="32">否</label>
        </div>
        <div class="form-check form-check-inline">
          <input type="text" class="form-control" id="科技型中小企业证书号" placeholder="证书号">
        </div>


      </div>

      <div class="col-12 col-sm-6 nei">

        <div class="laberTitle">是否专精特新企业</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否专精特新企业" id="41" value="是">
          <label class="form-check-label" for="41">是</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否专精特新企业" id="42" value="否" checked>
          <label class="form-check-label" for="42">否</label>
        </div>

        <div class="form-check form-check-inline">
          <input type="text" class="form-control" id="专精特新企业方向" placeholder="专精特新方向">
        </div>

      </div>


      <div class="col-12 col-sm-6 nei">

        <div class="laberTitle">是否军民融合企业</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否军民融合企业" id="41" value="是">
          <label class="form-check-label" for="41">是</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否军民融合企业" id="42" value="否" checked>
          <label class="form-check-label" for="42">否</label>
        </div>

      </div>

      <div class="col-12 col-sm-6 nei">

        <div class="laberTitle">是否瞪羚企业</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否瞪羚企业" id="41" value="是">
          <label class="form-check-label" for="41">是</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="是否瞪羚企业" id="42" value="否" checked>
          <label class="form-check-label" for="42">否</label>
        </div>

      </div>

    </div>


    


    <div class="col-12">
      <label for="lastName" class="form-label">单位简介（主营产品、研发基础等情况）</label>
      <!-- <input type="text" class="form-control" id="lastName" placeholder="" value="" required> -->

      <textarea class="form-control" id="单位简介" rows="5"></textarea>
    </div>


    <div class="alert alert-primary" role="alert">
      第二部分：需求项目信息
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label">需求项目名称：</label>
      <input type="text" class="form-control" id="需求项目名称" placeholder="" value="" required>
    </div>


    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label"> <span style="color: red;">*</span>需求联系人姓名：</label>
      <input type="text" class="form-control" id="需求联系人姓名" placeholder="" value="" required>
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label"><span style="color: red;">*</span>联系电话：</label>
      <input type="text" class="form-control" id="联系电话" placeholder="" value="" required>
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label">联系邮箱：</label>
      <input type="text" class="form-control" id="联系邮箱" placeholder="" value="" required>
    </div>

    <div class="col-sm-6 col-md-3">
      <label for="firstName" class="form-label">联系地址：</label>
      <input type="text" class="form-control" id="联系地址" placeholder="" value="" required>
    </div>

    <div class="row">

      <div class="col-md-12 nei">

        <div class="laberTitle">需求类别</div>

        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求类别" id="51" value="检验测试">
          <label class="form-check-label" for="51">检验测试</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求类别" id="52" value="联合研发" checked>
          <label class="form-check-label" for="52" checked>联合研发</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求类别" id="53" value="技术转移">
          <label class="form-check-label" for="53" checked>技术转移</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求类别" id="54" value="专家咨询">
          <label class="form-check-label" for="54" checked>专家咨询</label>
        </div>

      </div>



      <div class="col-md-12 nei">

        <div class="laberTitle">需求技术领域</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="61" value="生物医药">
          <label class="form-check-label" for="61">生物医药</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="62" value="电子信息">
          <label class="form-check-label" for="62" >电子信息</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="63" value="新材料">
          <label class="form-check-label" for="63" >新材料</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="64" value="能源环保">
          <label class="form-check-label" for="64" >能源环保</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="65" value="工业设计">
          <label class="form-check-label" for="65" >工业设计</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="66" value="装备制造">
          <label class="form-check-label" for="66" >装备制造</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="67" value="现代农业">
          <label class="form-check-label" for="67" >现代农业</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="需求技术领域" id="68" value="其他" checked>
          <label class="form-check-label" for="68" >其他</label>
        </div>

      </div>


      <div class="col-md-12 nei">

        <div class="laberTitle">合作类型</div>


        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="71" value="联合研发">
          <label class="form-check-label" for="71">联合研发</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="72" value="委托开发" checked>
          <label class="form-check-label" for="72" >委托开发</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="73" value="检验测试">
          <label class="form-check-label" for="73" >检验测试</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="74" value="技术入股">
          <label class="form-check-label" for="74" >技术入股</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="75" value="技术转让">
          <label class="form-check-label" for="75" >技术转让</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="76" value="技术许可">
          <label class="form-check-label" for="76" >技术许可</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="77" value="专家咨询">
          <label class="form-check-label" for="77" >专家咨询</label>
        </div>
        <div class="form-check form-check-inline">
          <input class="form-check-input" type="radio" name="合作类型" id="78" value="融资">
          <label class="form-check-label" for="78" >融资</label>
        </div>

      </div>


    </div>

    <div class="col-12">
      <label for="lastName" class="form-label"><span style="color: red;">*</span>需求描述(研发关键技术难题描述)</label>
      <textarea class="form-control" id="需求描述" rows="5"></textarea>
    </div>



    <div class="d-grid gap-2" style="margin-top: 30px;">
      <button class="btn btn-primary" type="button" id="sub" onclick="post_json()">提交需求信息</button>
    </div>



    <div style="height: 300px;">

    </div>



  </div>


  {% endblock %}


  {% block script %}


  <script type="text/javascript">

    function checkMobile(sMobile){ 
        if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test(sMobile))){ 
            alert("不是完整的11位手机号或者正确的手机号前七位"); 
            document.mobileform.mobile.focus(); 
            return false; 
        } 
    };

    $('#注册时间').datetimepicker({
      language: 'zh-CN',
      autoclose: 1,
      format: 'yyyy-mm-dd',
      minView: 3,
      todayHighlight: 1,

    });

    function post_json(){


      if (Boolean($('#需求单位名称').val()) == false){
        $('#需求单位名称').focus()

        alert('需求单位名称不能为空')
        return
      } else if (Boolean($('#需求联系人姓名').val()) == false){
        $('#需求联系人姓名').focus()

        alert('需求联系人姓名不能为空')
        return
      } else if (Boolean($('#联系电话').val()) == false){
        $('#联系电话').focus()

        alert('需求联系电话不能为空')
        return
      } else if (Boolean($('#需求描述').val()) == false){
        $('#需求描述').focus()
        alert('请对需求进行简单描述')
        return
      }

      if(!(/^1[3|4|5|8][0-9]\d{4,8}$/.test($('#联系电话').val()))){ 
            alert("不是完整的11位手机号或者正确的手机号前七位"); 
            $('#联系电话').focus()
            return false; 
      } 




      


      var data = {
        
        需求单位名称: $('#需求单位名称').val(),
        法人代表: $('#法人代表').val(),
        注册资本: $('#注册资本').val(),
        注册时间: $('#注册时间').val(),
        省: $('#省').val(),
        市: $('#市').val(),
        区: $('#区').val(),

        专利数量: $('#专利数量').val(),
        软件著作权: $('#软件著作权').val(),
        技术秘密数量: $('#技术秘密数量').val(),
        技术标准数量: $('#技术标准数量').val(),
        
        职工总数: $('#职工总数').val(),
        硕士: $('#硕士').val(),
        高级职称: $('#高级职称').val(),
        中级职称: $('#中级职称').val(),
        大学本科: $('#大学本科').val(),
        其他人员情况: $('#其他人员情况').val(),

        资产总额: $('#资产总额').val(),
        当年资产负债率: $('#当年资产负债率').val(),
        今年营收: $('#今年营收').val(),
        去年营收: $('#去年营收').val(),
        今年研发投入: $('#今年研发投入').val(),
        去年研发投入: $('#去年研发投入').val(),

        单位性质: $('input[name="单位性质"]:checked').val(),
        公司所属技术领域: $('input[name="公司所属技术领域"]:checked').val(),

        是否高新技术企业: $('input[name="是否高新技术企业"]:checked').val(),
        高新技术企业证书号: $('#高新技术企业证书号').val(),

        是否科技型中小企业: $('input[name="是否科技型中小企业"]:checked').val(),
        科技型中小企业证书号: $('#科技型中小企业证书号').val(),

        是否专精特新企业: $('input[name="是否专精特新企业"]:checked').val(),
        专精特新企业方向: $('#专精特新企业方向').val(),

        是否军民融合企业: $('input[name="是否军民融合企业"]:checked').val(),
        是否瞪羚企业: $('input[name="是否瞪羚企业"]:checked').val(),
        单位简介: $('#单位简介').val(),

        
        需求项目名称: $('#需求项目名称').val(),
        需求联系人姓名: $('#需求联系人姓名').val(),
        联系电话: $('#联系电话').val(),
        联系邮箱: $('#联系邮箱').val(),
        联系地址: $('#联系地址').val(),
        需求类别: $('input[name="需求类别"]:checked').val(),
        需求技术领域: $('input[name="需求技术领域"]:checked').val(),
        合作类型: $('input[name="合作类型"]:checked').val(),
        需求描述: $('#需求描述').val(),

      }

      $.ajax({
        url: "/ts/demand/",
        data: JSON.stringify(data),
        method: "post",
        dataType: "json",
        contentType: 'application/json;charset=utf-8',
        success: function(data){

            console.log(data)

            if (data.status == 1){

              alert("提交成功")


            } else if (data.status==-1){

              alert(data.errorMsg)

            }


            // $('#sub').hide()

        }

      })

    }

  </script>

  <style>
    .laberTitle {
      margin-bottom: 3px;
      font-weight: 600;

    }

    .nei {
      margin-top: 10px;
    }
  </style>

  {% endblock %}


